home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / TeX / tex_for_sgi.txt < prev   
Text File  |  1994-08-01  |  44KB  |  1,340 lines

  1. TeX and Silicon Graphics.
  2.  
  3. This is an installation procedure of TeX3.14, dvips5.47 and xdvi on Silicon
  4. Graphics 4D70GT under IRIX 3.3.1. I got sources by anonymous ftp, but you
  5. can get them on tape from TeX Users Group. Inquire at:
  6. TUG@math.ams.com
  7.  
  8. It is based on the Installation notes by Randolph J. Herber from Fermi Labs
  9. (HERBER@fnala.fnal.gov, herber@fnalf.fnal.gov, rjh@yclept.chi.il.us) which
  10. were posted on comp.sys.sgi and his comments on info-iris list.
  11. All the good things come from him. However, I did change some things,
  12. and faults are mine. I could not succeed in making bibtex. There is some
  13. problem with compiler or BibTeX or mine. Since I do not use bibtex,
  14. I do not care. If you know however how to make it, I would be glad to hear,
  15. since I would like to have complete TeX. This file was made as notes as I
  16. was progressing, without paying attention to style, etc. I did not read it
  17. after I wrote it. But maybe you will find it usefull, anyhow.
  18. Jan Labanowski
  19. Ohio Supercomputer Center
  20. jkl@osc.edu
  21.  
  22. script added to extract makefiles, emplant, etc. from
  23. tex_for_sgi file.  thus saving time and energy.  copy of makeTeX at end.
  24.  
  25.  
  26. The sources of TeX3.14 were taken from anonymous ftp on byron.u.washington.edu
  27. [128.95.48.32] as follows:
  28. 1. Login as root
  29. # mkdir /usr/distribution
  30. # cd /usr/distribution
  31. # ftp byron.u.washington.edu
  32. Login: anonymous
  33. Password: e-mail.address
  34. ftp> cd pub/unixtex
  35. ftp> ls -l
  36. total 19656
  37. -rw-r--r-- 1 root     system       5328 May 13 10:17 00README.ftp
  38. -rw-r--r-- 1 root     system     500000 May  8 14:29 DVIware.tar.Zaa
  39. -rw-r--r-- 1 root     system     500000 May  8 14:29 DVIware.tar.Zab
  40. -rw-r--r-- 1 root     system     500000 May  8 14:29 DVIware.tar.Zac
  41. -rw-r--r-- 1 root     system     500000 May  8 14:29 DVIware.tar.Zad
  42. -rw-r--r-- 1 root     system     500000 May  8 14:29 DVIware.tar.Zae
  43. -rw-r--r-- 1 root     system     292925 May  8 14:29 DVIware.tar.Zaf
  44. -rw-r--r-- 1 root     system     500000 May  8 14:29 LaTeXfonts.tar.Zaa
  45. -rw-r--r-- 1 root     system     500000 May  8 14:29 LaTeXfonts.tar.Zab
  46. -rw-r--r-- 1 root     system     500000 May  8 14:29 LaTeXfonts.tar.Zac
  47. -rw-r--r-- 1 root     system     500000 May  8 14:29 LaTeXfonts.tar.Zad
  48. -rw-r--r-- 1 root     system     500000 May  8 14:29 LaTeXfonts.tar.Zae
  49. -rw-r--r-- 1 root     system      66658 May  8 14:29 LaTeXfonts.tar.Zaf
  50. -rw-r--r-- 1 root     system       1679 May  8 14:16 NO_WARRANTY
  51. -rw-r--r-- 1 root     system      39582 May  8 14:16 README.TeX3.14
  52. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zaa
  53. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zab
  54. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zac
  55. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zad
  56. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zae
  57. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zaf
  58. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zag
  59. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zah
  60. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zai
  61. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zaj
  62. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zak
  63. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zal
  64. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zam
  65. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zan
  66. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zao
  67. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zap
  68. -rw-r--r-- 1 root     system     500000 May  8 14:38 TeX3.14.tar.Zaq
  69. -rw-r--r-- 1 root     system      75817 May  8 14:38 TeX3.14.tar.Zar
  70. -rw-r--r-- 1 root     system     153685 May  8 14:31 Unsupported.tar.Z
  71. -rw-r--r-- 1 root     system     500000 May  8 14:33 ams.tar.Zaa
  72. -rw-r--r-- 1 root     system     500000 May  8 14:33 ams.tar.Zab
  73. -rw-r--r-- 1 root     system     500000 May  8 14:33 ams.tar.Zac
  74. -rw-r--r-- 1 root     system     500000 May  8 14:33 ams.tar.Zad
  75. -rw-r--r-- 1 root     system      86695 May  8 14:33 ams.tar.Zae
  76. -rw-r--r-- 1 root     system     500000 May  8 14:26 babel.tar.Zaa
  77. -rw-r--r-- 1 root     system     208936 May  8 14:26 babel.tar.Zab
  78. -rw-r--r-- 1 root     system      20530 May  8 14:35 bsdtar.tar.Z
  79. -rw-r--r-- 1 root     system     500000 May  8 14:37 cmfonts.tar.Zaa
  80. -rw-r--r-- 1 root     system     500000 May  8 14:37 cmfonts.tar.Zab
  81. -rw-r--r-- 1 root     system     500000 May  8 14:37 cmfonts.tar.Zac
  82. -rw-r--r-- 1 root     system     500000 May  8 14:37 cmfonts.tar.Zad
  83. -rw-r--r-- 1 root     system     252938 May  8 14:37 cmfonts.tar.Zae
  84. -rw-r--r-- 1 root     system      92160 May  8 14:38 compress.tar
  85. -rw-r--r-- 1 root     system      70593 May  8 14:38 patch.tar.Z
  86. -rw-r--r-- 1 root     system     397543 May  8 14:38 utilityfonts.tar.Z
  87. ftp> binary
  88. ftp> prompt
  89. ftp> mget *
  90.   you will get all these files - you need some disk space.
  91. ftp> quit
  92.  
  93. Then I ftp-ed to labrea.stanford.edu [36.8.0.47]
  94. Name: anonymous
  95. Password: e-mail address
  96. ftp> cd pub
  97. ftp> binary
  98. ftp> get dvips547.tar.Z
  99. ftp> get dvipsafm.tar.Z
  100. ftp> get dvipslib.tar.Z
  101. ftp> quit
  102.  
  103. Then I got file modes.mf from anonymous ftp:
  104.    ftp.cs.umb.edu [192.12.26.23] 
  105.  which is in: pub/tex/modes.mf
  106.  
  107. ==========================
  108.  
  109. Then the files were uncompressed and untared as:
  110.  
  111. zcat DVIware.tar.Za* | tar xvof -
  112. zcat TeX3.14.tar.Za* | tar xvof -
  113. zcat LaTeXfonts.tar.Za* | tar xvof -
  114. zcat cmfonts.tar.Za* | tar xvof -
  115. zcat utilityfonts.tar.Z | tar xvof -
  116. zcat dvips547.tar.Z | tar xvof -
  117. zcat dvipsafm.tar.Z | tar xvof -
  118. zcat dvipslib.tar.Z | tar xvof -
  119.  
  120.  
  121. Then I read all the README files and other instalation files in all the
  122. directories (it takes a few days).
  123.  
  124. Then: (assuming we are in: /usr/distribution)
  125. 1) cd TeX3.14
  126. 2) cp Makefile-dist Makefile
  127. 3) cp site.h-dist site.h
  128. 4) cp makefile some.makefile (there was some junk makefile in the distrib)
  129. 5) Then I created small script in /usr/distribution and named it emplant
  130.  
  131. ------------------------- cut here -----------
  132. #!/bin/sh
  133. cp $4 $5
  134. chmod $1 $5
  135. chgrp $3 $5
  136. chown $2 $5
  137. ------------------------- till here ----------------
  138. 6) chmod 755 emplant (this is a simple install program)
  139. 7) I edited Makefile to be:
  140. ----------------------------- Makefile starts --------------
  141. # Overall Makefile for making TeX, Metafont, and friends, using WEB to C.
  142.  
  143.  
  144. # TeX 3.14 + Metafont 2.7 + web2c b.
  145. version=5.84b
  146.  
  147. # Directory that site.h is in relative to subdirectories, i.e., `..'
  148. # means the directory containing this Makefile.
  149. SITEDIR=..
  150.  
  151. # Default C compiler.
  152. #CC=gcc
  153. CC=cc
  154.  
  155. # Default flags to give the C compiler.  (Don't define CFLAGS directly.)
  156. #OPT=-g -O
  157. OPT=-g -O
  158.  
  159. # Default flags to give to the loader.
  160. LDFLAGS=
  161.  
  162. # Default libraries with which to link (libraries for the Metafont
  163. # support are specified separately).
  164. LOADLIBES=
  165.  
  166. # Make sure we use the sh.  If your sh is broken, you might try bash,
  167. # the GNU replacement.
  168. SHELL=/bin/sh
  169.  
  170. # The yacc program to use on web2c/web2c.yacc.
  171. #YACC=bison -y
  172. YACC=yacc
  173.  
  174. # The lex program to use on web2c/web2c.lex.
  175. LEX=lex
  176. # -ll for lex, -lfl for flex.
  177. LEXLIB=-ll
  178.  
  179. # Need -D_POSIX_SOURCE here, perhaps, if on a POSIX system.
  180. LEXCFLAGS=
  181.  
  182. # How to make a link.
  183. LN=ln -s
  184.  
  185. # Support libraries for Metafont.
  186. x10lib=-lX
  187. x11lib=-lXt -lX11
  188. sunlib=-lsuntool -lsunwindow -lpixrect
  189.  
  190. # This line should select the libraries that match what you said in site.h.
  191. wlibs=$(x11lib)
  192.  
  193. # These lines define the format and base files that `make fmts' and
  194. # `make bases' will try to make, and `make install' will try to install.
  195. # See README.W2C for a brief description of each of these formats.
  196. #formats=tex.fmt
  197. formats=tex.fmt latex.fmt slitex.fmt 
  198. #amstex.fmt amslatex.fmt picplus.fmt texinfo.fmt
  199. # etex.fmt latex.fmt slitex.fmt \
  200. # amstex.fmt amslatex.fmt picplus.fmt texinfo.fmt
  201. #bases=mf.base
  202. bases=mf.base cmmf.base
  203. # cmmf.base
  204.  
  205. # The name of the file that defines your local devices, for use with
  206. # Metafont.  (Only relevant during `make bases'.)  I urge you to get the
  207. # file `modes.mf', which defines all known modes, plus useful
  208. # definitions for all fonts.  It's available from ftp.cs.umb.edu
  209. # [192.12.26.23] as pub/tex/modes.mf, among other places.
  210. localmodes=modes
  211.  
  212.  
  213. # You may need INSTALL=cp on system V, if you don't have GNU install. 
  214. # Or you can install the programs by hand.
  215. # $(fileinstall) is used for the format and base files, man files, and
  216. # other non-executables, and $(programinstall) is used for
  217. # the executables.
  218. #INSTALL=install -g tex -c
  219. #fileinstall=$(INSTALL) -m 664
  220. #proginstall=$(INSTALL) -m 775 -s
  221. INSTALL=/usr/distribution/TeX3.14/emplant
  222. fileinstall=$(INSTALL) 664 bin sys
  223. proginstall=$(INSTALL) 755 bin sys
  224.  
  225. # These pathnames are used to customize the manual pages with local
  226. # directory names; some of them are used in `make install'.  They should
  227. # match the system directories in the paths defined in `./site.h'.
  228. bindir=/usr/local/bin
  229. manext=l
  230. mandir=/usr/man/u_man/man$(manext)
  231.  
  232. texlibdir=/usr/local/lib/tex
  233. texpooldir=$(texlibdir)
  234. #texinputdir=$(texlibdir)/macros
  235. texinputdir=$(texlibdir)/inputs
  236. #texfontdir=$(texlibdir)/fonts
  237. texfontdir=$(texlibdir)/fonts/tfm
  238. formatdir=$(texlibdir)/formats
  239.  
  240. mflibdir=/usr/local/lib/mf
  241. mfpooldir=$(mflibdir)
  242. #mfinputdir=$(mflibdir)/macros
  243. mfinputdir=$(mflibdir)/inputs
  244. basedir=$(mflibdir)/bases
  245.  
  246. # Where the Computer Modern sources are.
  247. # (The man pages claim that you have installed the standard utility
  248. # sources, like `grayf.mf' and `expr.mf', somewhere in $(mfinputdir).)
  249. #cmsources=/usr/local/src/other/TeX+MF/typefaces/cm
  250. cmsources=/usr/local/lib/mf/inputs
  251.  
  252. default: all
  253.  
  254.  
  255. # Stuff below here probably doesn't need to be changed.
  256. #alldirs=web tex mf texware mfware fontutil bibtex dviutil
  257. alldirs=web tex mf texware mfware fontutil dviutil
  258. triptrapdirs=tex texware mf mfware
  259.  
  260. makeargs=SITEDIR="$(SITEDIR)" CC="$(CC)" OPT="$(OPT)" \
  261. SHELL="$(SHELL)" LDFLAGS="$(LDFLAGS)" LOADLIBES="$(LOADLIBES)" wlibs="$(wlibs)"
  262.  
  263. web2c=web2c
  264. web2cprograms=$(web2c)/web2c $(web2c)/regfix $(web2c)/splitup \
  265.               $(web2c)/fixwrites
  266. commonsources=common/alloca.c common/extra.c common/main.c common/endian.c
  267.  
  268. triptrap: stamp-tangle stamp-common
  269.     for name in $(triptrapdirs);                    \
  270.         do                                \
  271.           (cd $${name}; make $(makeargs) LN="$(LN)" triptrap);        \
  272.         done  
  273.  
  274. run-triptrap: run-trip run-trap
  275.  
  276. clean-triptrap:
  277.     cd tex; make veryclean
  278.     cd mf; make veryclean
  279.  
  280. all:    stamp-web2c stamp-common
  281.     for name in $(alldirs);                        \
  282.         do                                \
  283.           (cd $${name}; echo $${name}; make $(makeargs) all);        \
  284.         done
  285.  
  286. TeX:    stamp-web2c stamp-tangle stamp-common
  287.     cd tex; make $(makeargs) all
  288.  
  289. BibTeX: stamp-web2c stamp-tangle stamp-common
  290.     cd bibtex; make $(makeargs) all
  291.  
  292. run-trip:
  293.     cd tex; make run-trip
  294.  
  295. MF:    stamp-web2c stamp-tangle stamp-common
  296.     cd mf; make $(makeargs) all
  297.  
  298. run-trap:
  299.     cd mf; make run-trap
  300.  
  301.  
  302. # The targets below must be up to date for anything to be made.
  303.  
  304. stamp-web2c:
  305.     cd $(web2c); \
  306.           make $(makeargs) YACC="$(YACC)" LEX="$(LEX)" LEXLIB="$(LEXLIB)" all
  307.     touch stamp-web2c
  308.  
  309. stamp-common: $(commonsources)
  310.     cd common; make $(makeargs) all
  311.     touch stamp-common
  312.  
  313. stamp-tangle: stamp-web2c stamp-common
  314.     cd web; make $(makeargs) tangle
  315.     touch stamp-tangle
  316.  
  317.  
  318. manpages:
  319.     cd man; make SITEDIR=$(SITEDIR)                    \
  320.         bindir=$(bindir) texlibdir=$(texlibdir)            \
  321.         texpooldir=$(texpooldir) formatdir=$(formatdir)        \
  322.         texinputdir=$(texinputdir) texfontdir=$(texfontdir)    \
  323.         mflibdir=$(mflibdir) mfpooldir=$(mfpooldir)        \
  324.         basedir=$(basedir) mfinputdir=$(mfinputdir)        \
  325.                 cmsources=$(cmsources)                    \
  326.                 all
  327.  
  328. bases: stamp-bases
  329. stamp-bases:
  330.     cd mf; MFPOOL=.; export MFPOOL; \
  331.           make bases="$(bases)" localmodes="$(localmodes)" bases
  332.     touch stamp-bases
  333.  
  334. formats: stamp-formats
  335. stamp-formats:
  336.     cd tex; TEXPOOL=.; export TEXPOOL; make formats="$(formats)" fmts
  337.     touch stamp-formats
  338.  
  339.  
  340. # Installation targets.
  341. install-manpages:
  342.     cd man; make mandir=$(mandir) INSTALL="$(fileinstall)" \
  343.           SITEDIR="$(SITEDIR)" manext=$(manext) install
  344.  
  345. install:
  346.     if test -d $(bindir); then exit 0; else mkdir $(bindir); fi
  347.     $(proginstall) tex/initex $(bindir)/initex
  348.     $(proginstall) tex/virtex $(bindir)/virtex
  349.     $(proginstall) mf/inimf $(bindir)/inimf
  350.     $(proginstall) mf/virmf $(bindir)/virmf
  351.     $(proginstall) web/tangle $(bindir)/tangle
  352.     $(proginstall) web/weave $(bindir)/weave
  353.     $(proginstall) texware/dvitype $(bindir)/dvitype
  354.     $(proginstall) texware/pltotf $(bindir)/pltotf
  355.     $(proginstall) texware/tftopl $(bindir)/tftopl
  356.     $(proginstall) mfware/gftodvi $(bindir)/gftodvi
  357.     $(proginstall) mfware/gftopk $(bindir)/gftopk
  358.     $(proginstall) mfware/gftype $(bindir)/gftype
  359.     $(proginstall) mfware/mft $(bindir)/mft
  360.     $(proginstall) fontutil/pktogf $(bindir)/pktogf
  361.     $(proginstall) fontutil/pktype $(bindir)/pktype
  362.     $(proginstall) fontutil/vftovp $(bindir)/vftovp
  363.     $(proginstall) fontutil/vptovf $(bindir)/vptovf
  364.     $(proginstall) bibtex/bibtex $(bindir)/bibtex
  365.     $(proginstall) dviutil/dvicopy $(bindir)/dvicopy
  366.     if test -d $(texpooldir); then exit 0; else mkdir $(texpooldir); fi
  367.     -if test -s tex/tex.pool; \
  368.         then (cd tex; $(fileinstall) tex.pool $(texpooldir) ); fi
  369.     if test -d $(mfpooldir); then exit 0; else mkdir $(mfpooldir); fi
  370.     -if test -s mf/mf.pool; \
  371.         then (cd mf; $(fileinstall) mf.pool $(mfpooldir) ); fi
  372.  
  373. install-formats: stamp-formats
  374.     if test -d $(formatdir); then exit 0; else -mkdir $(formatdir); fi
  375.     for f in $(formats);                        \
  376.     do                                \
  377.       rm -f $(bindir)/`basename $$f .fmt`;                \
  378.           ln $(bindir)/virtex $(bindir)/`basename $$f .fmt`;        \
  379.           $(fileinstall) tex/$$f $(formatdir)/$$f;            \
  380.     done
  381.     cd $(formatdir); rm -f plain.fmt; ln tex.fmt plain.fmt
  382.  
  383. install-bases: stamp-bases
  384.     if test -d $(basedir); then exit 0; else -mkdir $(basedir); fi
  385.     for f in $(bases);                        \
  386.     do                                \
  387.       rm -f $(bindir)/`basename $$f .base`;                \
  388.       ln $(bindir)/virmf $(bindir)/`basename $$f .base`;        \
  389.           $(fileinstall) mf/$$f $(basedir);                \
  390.     done
  391.     cd $(basedir); rm -f plain.base; ln mf.base plain.base
  392.  
  393.  
  394. # Need GNU tar for this.
  395. web2c-dist: web/tangleboot.pas
  396.     @echo -n "check -linet;tangleboot"
  397.     @echo "big{tex,mf.ch; trie change"
  398.     mv ChangeLog ChangeLog.W2C
  399.     cd ..;                                \
  400.       find src-$(version) \! -name '*.web' -type f -print > /tmp/files; \
  401.       tar czfT web2c-$(version).tar.Z /tmp/files;            \
  402.           ls -ld web*
  403.     mv ChangeLog.W2C ChangeLog
  404.  
  405. web-dist: web/tangleboot.pas
  406.     cd ..;                                \
  407.           find src-$(version) -name '*.web' -print > /tmp/webfest;    \
  408.           tar czfT web-$(version).tar.Z /tmp/webfest;            \
  409.           ls -ld web*
  410.  
  411. web/tangleboot.pas:
  412.     cd web; make tangle.p; cp tangle.p tangleboot.pas; make veryclean
  413.  
  414. clean:
  415.     rm -f stamp-*
  416.     for name in web2c common $(alldirs);                \
  417.         do                                \
  418.           (cd $${name}; make clean);                    \
  419.         done
  420.  
  421. veryclean:
  422.     rm -f stamp-*
  423.     for name in web2c common man $(alldirs);            \
  424.         do                                \
  425.           (cd $${name}; make veryclean);                \
  426.         done
  427.     rm -f \#*\# *~ *.bak *.ckp core
  428.  
  429. .PHONY: default triptrap run-triptrap clean-triptrap all TeX run-trip \
  430.     MF run-trap manpages bases formats install-manpages install \
  431.         install-formats install-bases web2c-dist web-dist clean veryclean
  432.  
  433. ----------------------------- Makefile ends --------------
  434.  
  435.  
  436.  
  437. 8) I edited site.h to be:
  438. ----------------------------- site.h starts ---------
  439. /* Master configuration file for WEB to C.  Almost all the definitions
  440.    are wrapped with #ifndef's, so that you can override them from the
  441.    command line, if you want to.  */
  442. #ifndef __WEB2C_SITE_H
  443. #define __WEB2C_SITE_H
  444.  
  445. /* Define if you're on an AIX-based system.  */
  446. #ifndef AIX
  447. #undef AIX
  448. #endif
  449.  
  450. /* Define if you're on 4.2 or 4.3 BSD-based system.  */
  451. #ifndef BSD
  452. #undef    BSD
  453. #endif
  454.  
  455. /* Define if you're on an HP-based system (also define SYSV).  */
  456. #ifndef HP
  457. #undef HP
  458. #endif
  459.  
  460. /* Define if you're on a POSIX-based system.  */
  461. #ifndef _POSIX_SOURCE
  462. #undef _POSIX_SOURCE
  463. #endif
  464.  
  465. /* Define if you're on System V-based system.  */
  466. #ifndef SYSV
  467. #define    SYSV
  468. #endif
  469.  
  470. /* Define this if the system will be compiled with an ANSI C compiler,
  471.    and never with a non-ANSI compiler.  It changes web2c so that it
  472.    produces ANSI C as its output.  This is a perhaps good idea, but you
  473.    don't necessarily gain anything in the production programs by doing
  474.    it.  If you do define this, you must also have a declaration for
  475.    sprintf(3) in <stdio.h>.  */ 
  476. #ifndef ANSI
  477. #undef    ANSI
  478. #endif
  479.  
  480. /* Default editor command string: `%d' expands to the line number where
  481.    TeX or Metafont found an error and `%s' expands to the name of the
  482.    file.  The environment variables TEXEDIT and MFEDIT override this.  */
  483. #define    EDITOR    "/usr/local/bin/emacs +%d %s"
  484.  
  485. /* Define these according to your local setup.  It doesn't hurt anything
  486.    to have `.' in all the paths, but since most users do not have their
  487.    own fonts, formats, or string pools, it only slows things down.
  488.    Do not put a leading or trailing colon in these paths, or double a
  489.    colon in the middle.  That might lead to infinite recursion.
  490.    Also see TEXFONTS_SUBDIR et al., below.  */
  491. #define    TEXFONTS   ".:/usr/local/lib/tex/fonts/tfm" /* #define    TEXFONTS   "" */
  492. #define    TEXFORMATS ".:/usr/local/lib/tex/formats" /* #define    TEXFORMATS "/usr/local/lib/tex/formats" */
  493. #define    TEXINPUTS  ".:/usr/local/lib/tex/inputs" /* #define    TEXINPUTS  "." */
  494. #define    TEXPOOL    "/usr/local/lib/tex" /* #define    TEXPOOL    "/usr/local/lib/tex" */
  495. #define    MFBASES    ".:/usr/local/lib/mf/bases" /* #define    MFBASES    "/usr/local/lib/mf/bases" */
  496. #define    MFINPUTS   ".:/usr/local/lib/mf/inputs" /* #define    MFINPUTS   ".:/usr/local/lib/mf/macros" */
  497. #define    MFPOOL     "/usr/local/lib/mf" /* #define    MFPOOL     "/usr/local/lib/mf" */
  498. #define VFFONTS       ".:/usr/local/lib/tex/fonts/vf" /* #define VFFONTS       "/usr/local/lib/tex/fonts/vf" */
  499.  
  500. /* Define this if you want subdirectories of directories in the search
  501.    paths to be searched.  (See discussion in ./README.WEB2C of directory
  502.    hierarchies.)  */
  503. #ifndef SEARCH_SUBDIRECTORIES
  504. #undef SEARCH_SUBDIRECTORIES
  505. #endif
  506.  
  507. /* If SEARCH_SUBDIRECTORIES is defined, these symbols define paths in
  508.    which to look for subdirectories.  The directories in TEXFONTS and
  509.    the like, above, are not searched for subdirectories.  The
  510.    directories named here are not themselves searched for files.  Not
  511.    all of the symbols here need be defined.  If you don't want to define
  512.    a default directory, but want users to be able to define the
  513.    environment variables, define the symbol to be the empty string.  */
  514. #ifdef SEARCH_SUBDIRECTORIES
  515. #define TEXFONTS_SUBDIR "/usr/local/lib/tex/fonts/tfm"
  516. #define TEXINPUTS_SUBDIR "/usr/local/lib/tex/inputs"
  517. #define MFINPUTS_SUBDIR "/usr/local/lib/mf/inputs"
  518. #endif
  519.  
  520. /* BibTeX search path for .bib files.  BibTeX uses TEXINPUTS to search
  521.    for .bst files.  */ 
  522. #define    BIBINPUTS    ".:/usr/local/lib/tex/bib"
  523.  
  524. /* Metafont window support: More than one may be defined, as long as you
  525.    don't try to have both X10 and X11 support (because there are
  526.    conflicting routine names in the libraries).  After you've defined
  527.    these, make sure to update the top-level Makefile accordingly.  Also,
  528.    if you want X11 support, see the `Online output from Metafont'
  529.    section in ./README before compiling.  */
  530. #undef    HP2627WIN        /* HP 2627. */
  531. #undef    SUNWIN            /* SunWindows. */
  532. #undef    TEKTRONIXWIN        /* Tektronix 4014. */
  533. #undef    UNITERMWIN        /* Uniterm Tektronix.  */
  534. #undef    X10WIN            /* X Version 10. */
  535. #define    X11WIN            /* X Version 11. */
  536. #define HAVE_GETWD
  537. #define SPRINTF_RETURN_TYPE int
  538.  
  539. #if defined(X10WIN) && defined(X11WIN)
  540. sorry
  541. #endif
  542.  
  543. /* Define this to be the return type of your signal handlers.  POSIX
  544.    says it should be `void', but some older systems want `int'.  Check
  545.    your <signal.h> include file if you're not sure.  */
  546. #ifndef SIGNAL_HANDLER_RETURN_TYPE
  547. #define SIGNAL_HANDLER_RETURN_TYPE void
  548. #endif
  549.  
  550. /* The type `glueratio' should be a floating point type which won't
  551.    unnecessarily increase the size of the memoryword structure.  This is
  552.    the basic requirement.  On most machines, if you're building a
  553.    normal-sized TeX, then glueratio must probably meet the following
  554.    restriction: sizeof(glueratio) <= sizeof(integer).  Usually, then,
  555.    glueratio must be `float'.  But if you build a big TeX, you can (on
  556.    most machines) and should make it `double' to avoid loss of precision
  557.    and conversions to and from double during calculations.  (All this
  558.    also goes for Metafont.)  Furthermore, if you have enough memory, it
  559.    won't hurt to have this defined to be `double' for running the
  560.    trip/trap tests.  */
  561. typedef double glueratio;
  562.  
  563. /* Define this if you want TeX to be compiled with local variables
  564.    declared as `register'.  On SunOS 3.2 and 3.4 (at least), compiling
  565.    with cc, this will cause problems.  If you're using gcc or the SunOS
  566.    4.x compiler, and compiling with -O, register declarations are
  567.    ignored, so there is no point in defining this.  */
  568. #ifndef REGFIX
  569. #undef    REGFIX
  570. #endif
  571.  
  572. /* The type `schar' should be defined here to be the smallest signed
  573.    type available.  If your char type is unsigned, then define schar to
  574.    be the type `short'.  */
  575. #ifdef AIX
  576. typedef int schar;
  577. #else
  578. #ifdef ANSI
  579. typedef signed char schar;
  580. #else
  581. typedef    signed char schar;
  582. #endif /* not ANSI */
  583. #endif /* not AIX */
  584.  
  585. /* If you want to be able to produce a core dump (to make a preloaded
  586.    TeX) by giving the filename `HackyInputFileNameForCoreDump.tex' to
  587.    TeX (or Metafont), define this.  Probably works only for BSD-like
  588.    systems.  */
  589. #ifndef FUNNY_CORE_DUMP
  590. #undef FUNNY_CORE_DUMP
  591. #endif
  592.  
  593. /* If the type `int' is at least 32 bits (including a sign bit), this
  594.    symbol should be #undef'd; otherwise, it should be #define'd.  If
  595.    your compiler uses 16-bit int's, arrays larger than 32K may give you
  596.    problems, especially if indices are automatically cast to int's.  */
  597. #ifndef SIXTEENBIT
  598. #undef    SIXTEENBIT
  599. #endif
  600.  
  601. /* Our character set is 8-bit ASCII unless NONASCII is defined.  For
  602.    other character sets, make sure that first_text_char and
  603.    last_text_char are defined correctly (they're 0 and 255,
  604.    respectively, by default).  In the *.defines files, change the
  605.    indicated range of type `char' to be the same as
  606.    first_text_char..last_text_char, `#define NONASCII', and retangle and
  607.    recompile everything.  */
  608. #ifndef NONASCII
  609. #undef    NONASCII
  610. #endif
  611.  
  612. /* The type `integer' must be a signed integer capable of holding at
  613.    least the range of numbers (-2^31)..(2^32-1).  The ANSI C standard
  614.    says that `long' meets this requirement, but if you don't have an
  615.    ANSI C compiler, you might have to change this definition.  */
  616. typedef long integer;
  617.  
  618. /* You need not worry about the definitions in `defaults.h' unless
  619.    something goes wrong.  */
  620. #include "defaults.h"
  621.  
  622. #endif /* not __WEB2C_SITE_H */
  623. ----------------------------- site.h ends --------------------
  624.  
  625.  
  626. 9) Then I created small script mypaths in /usr/distribution/TeX3.14:
  627. ---------------------- start my paths -------------
  628. #!/bin/csh
  629. set bl=/usr/local/bin
  630. set ll=/usr/local/lib
  631. set tl=$ll/tex
  632. set ml=$ll/mf
  633. set wl=`pwd`
  634. set fl=$tl/fonts/tfm
  635. set dl=($bl $ll $tl $tl/formats $tl/fonts \
  636.     $tl/fonts/tfm $tl/inputs \
  637.     $tl/bib $ml $ml/bases $ml/inputs)
  638. set path=($path .)
  639. --------------------- end mypaths ------------
  640. 10) I did:
  641.     chmod 755 mypaths
  642.     source mypaths
  643.     chmod 755 $dl
  644.     chgrp sys $dl
  645.     chown bin $dl
  646.     cp $wl/TeXfonts/* $fl
  647.     
  648. 11) Then I edited Install_INPUTS from ./TeX3.14 to be:
  649. ---------------- Install_INPUTS -----------
  650. #!/bin/sh
  651. #
  652. # This script is ./TeX3.14/Install_INPUTS.
  653. # Look at the destination directories for 
  654. # TEXINPUTS, BIBINPUTS, and MFINPUTS below.
  655. # Make sure that they are defined correctly,
  656. # matching up with your definitions in site.h.
  657. #
  658. # If you are certain that you will not be using BibTeX or LaTeX
  659. # or whatever else, you may comment out the lines concerned 
  660. # by preceding them with a hash mark (#); but keep in mind that
  661. # you will need LaTeX if you wish to print out the manual for 
  662. # the PostScript printer driver (in ./DVIware/laser-setters/dvi-to-ps/TeXPS).
  663. #
  664. #
  665. TEXINPUTS=/usr/local/lib/tex/inputs; export TEXINPUTS
  666. BIBINPUTS=/usr/local/lib/tex/bib; export BIBINPUTS
  667. MFINPUTS=/usr/local/lib/mf/inputs; export MFINPUTS
  668. chmod 666 $TEXINPUTS/*.tex
  669. chmod 666 $TEXINPUTS/*.sty
  670. # chmod 666 $TEXINPUTS/*.def #not needed in this distribution
  671. chmod 666 $TEXINPUTS/*.bst
  672. chmod 666 $TEXINPUTS/*.bbl
  673. chmod 666 $TEXINPUTS/*.aux
  674. chmod 666 $BIBINPUTS/*.bib
  675. find $MFINPUTS -name '*.mf' -exec chmod 666 {} \;
  676. # chmod 666 $MFINPUTS/*.mf
  677. cp ./TeXmacros/*.tex $TEXINPUTS/.
  678. cp ./TeXmacros/*.sty $TEXINPUTS/.
  679. cp ./MFtexfiles/*.mft $TEXINPUTS/.
  680. cp ./LaTeX/*.tex $TEXINPUTS/.
  681. cp ./LaTeX/LaTeXmacros/*.tex $TEXINPUTS/.
  682. cp ./LaTeX/LaTeXmacros/*.sty $TEXINPUTS/.
  683. cp ./LaTeX/LaTeXmakeindex/lib/*.tex $TEXINPUTS/.
  684. cp ./LaTeX/LaTeXmakeindex/lib/*.sty $TEXINPUTS/.
  685. cp ./LaTeX/LaTeXmakeindex/paper/*.tex $TEXINPUTS/.
  686. cp ./LaTeX/LaTeXmakeindex/paper/*.sty $TEXINPUTS/.
  687. cp ./LaTeX/LaTeXmakeindex/paper/*.bbl $TEXINPUTS/.
  688. cp ./LaTeX/LaTeXslitex/*.tex $TEXINPUTS/.
  689. cp ./LaTeX/LaTeXslitex/*.sty $TEXINPUTS/.
  690. cp ./BibTeX.inputs/*.tex $TEXINPUTS/.
  691. cp ./BibTeX.inputs/*.sty $TEXINPUTS/.
  692. cp ./BibTeX.inputs/*.bst $TEXINPUTS/.
  693. cp ./BibTeX.inputs/*.bbl $TEXINPUTS/.
  694. cp ./BibTeX.inputs/*.aux $TEXINPUTS/.
  695. cp ./BibTeX.inputs/*.bib $BIBINPUTS/.
  696. cp ../cmfonts/mf/*.mf $MFINPUTS/.
  697. cp ../LaTeXfonts/mf/*.mf $MFINPUTS/.
  698. cp ../utilityfonts/bases/*.mf $MFINPUTS/.
  699. cp ../utilityfonts/black/*.mf $MFINPUTS/.
  700. cp ../utilityfonts/gray/*.mf $MFINPUTS/.
  701. cp ../utilityfonts/half/*.mf $MFINPUTS/.
  702. cp ../utilityfonts/logo/*.mf $MFINPUTS/.
  703. cp ../utilityfonts/manualfonts/*.mf $MFINPUTS/.
  704. cp ../utilityfonts/mfbook/*.mf $MFINPUTS/.
  705. cp ../utilityfonts/slant/*.mf $MFINPUTS/.
  706. (cd $TEXINPUTS; chmod 444 *)
  707.  
  708.  
  709. ------------------------ end Install_INPUTS -------------
  710.  
  711. 12) Then I did:
  712.     sh -x Install_INPUTS
  713. 13) cp /usr/distribution/modes.mf /usr/local/lib/mf/modes.mf
  714.  
  715. 14) Then I edited /usr/local/lib/mf/inputs/modes.mf (which was copied above)
  716.     to set localfont (few lines from the end of the file) to be
  717.     localfont := laserwriter; 
  718.     since we are using Texas Inst. Omnilaser here most of the time.
  719.  
  720. 15) Then, in /usr/distribution/TeX3.14 I did
  721.    make
  722.    make install
  723.    make formats
  724.    make install-formats
  725.    make bases
  726.    make install-bases
  727.    make manpages
  728.    make install-manpages
  729.  
  730. If you have Documenters Workbench (i.e., nroff) you are O.K.
  731. I do not have it, so I have processed each manpage from /usr/local/man/manl
  732.  
  733.   nroff -man manpage.l | compress > manpage.Z 
  734. on the SUN and then put them into /usr/man/u_man/manl.
  735.  
  736. This concluded instalation of TeX, LaTeX, Metafont, etc.
  737.  
  738. =================== makeindex =========================
  739.   makeindex installation:
  740.  
  741. There is a makeindex program which does indexes from *.idx files produced
  742. by LaTeX. 
  743. I went to /usr/distribution/TeX3.14/LaTeX/LaTeXmakeindex/src.
  744.   mv makefile Makefile
  745.   edited a single line in Makefile by adding -g flag to CFLAGS
  746.   make makeindex
  747.   cp makeindex /usr/local/bin
  748.   cd ../doc 
  749.   zcat makeindex.l.Z > /usr/local/man/man1/makeindex.l
  750.   mkdir /usr/local/lib/tex/doc/makeindex
  751.   cp makeindex.aux /usr/local/lib/tex/doc/makeindex
  752.   cp makeindex.tex /usr/local/lib/tex/doc/makeindex
  753.   cd ../paper
  754.   mkdir /usr/local/lib/tex/doc/makeindex/paper
  755.   cp * /usr/local/lib/tex/doc/makeindex/paper
  756.   cd ../test
  757.   mkdir /usr/local/lib/tex/doc/makeindex/test
  758.   cp * /usr/local/lib/tex/doc/makeindex/test
  759.  
  760. ======================== detex =====================
  761. this program removes TeX constructions from the file (good for spell)
  762. and leaves text.
  763.  
  764. cd /usr/distribution/TeX3.14/TeXcontrib/trinkle
  765. make detex
  766. cp detex /usr/local/bin
  767. cp detex.1l /usr/local/man/man1
  768.  
  769. ====================== tgrind ========================
  770.  
  771. tgrind prints nicely programs and shell scripts in TeX.
  772. I went to /usr/distribution/TeX3.14/TeXcontrib/van/tgrind/SYS_V
  773. and made the following corrections in Makefile
  774.  
  775. DESTDIR=/usr/local/bin
  776. DEFSFILE=/usr/local/lib/tex/inputs/vgrindefs      #at the top
  777. TEXINPUTS=/usr/local/lib/tex/inputs
  778.  
  779. install: all
  780.     cp tfontedpr ${DESTDIR}
  781.     cp tgrind.sh ${DESTDIR}/tgrind
  782.     cp tgrindmac.tex ${TEXINPUTS}/tgrindmac.tex    #at the bottom
  783.     cp vgrindefs.src ${DEFSFILE}
  784.  
  785. an also corrected paths in tgrind.sh:
  786.  
  787.    b=/usr/local/bin/tfontedpr
  788.    tex=/usr/local/bin/tex
  789.  
  790. then did:
  791. make
  792. make install
  793.  
  794. =========================== XDVI =======================
  795. This is a dvi previewer for X. Works fine, but has some
  796. peculiar bug -- magnifying glass (only magnyfing glass)
  797. skips the first letter of the paragraph...
  798.  
  799. Now, how I did it:
  800.  
  801. 1. Go to directory:
  802.    /usr/distribution/DVIware/crt-viewers/X/xdvi
  803.  
  804. 2. Edit Makefile to be:
  805.  
  806. ----------- Makefile for XDVI starts ----------
  807. #
  808. # Makefile for dvi previewer.
  809. #
  810. # $Header: Makefile,v 1.2 87/05/14 14:05:34 eichin Locked $
  811. # $Source: /u1/uus/vs2/xdvi/RCS/Makefile,v $
  812. #
  813.  
  814. DEFAULT_FONT_PATH=.:/usr/local/lib/tex/fonts/pk/laserwriter:/usr/local/lib/tex/fonts
  815. DEFAULT_FONT_SIZES=300:328.6:360:432:518.4:622:746.4
  816. DEFAULT_SUBDIR_PATH='**'
  817. DEFS=-DMSBITFIRST -DBMSHORT -DBUTTONS
  818. FONTDEFINES=-DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\" \
  819.   -DDEFAULT_FONT_SIZES=\"$(DEFAULT_FONT_SIZES)\" \
  820.   -DDEFAULT_SUBDIR_PATH=\"$(DEFAULT_SUBDIR_PATH)\"
  821. FONTFORMATS_C=pk.c gf.c pxl.c
  822. FONTFORMATS_O=pk.o gf.o pxl.o
  823. TOP=/usr
  824. INCDIR=$(TOP)/include/X11
  825. LIBDIR=$(TOP)/lib
  826. XMULIB=-lXmu
  827. EXTENSIONLIB=-lXext
  828. DESTDIR=/usr/local
  829. BINDIR=$(DESTDIR)/bin
  830. MANDIR=$(DESTDIR)/man/man1
  831. INCLUDES=-I$(INCDIR)
  832. CFLAGS=-O $(INCLUDES) $(DEFS)
  833. LIBS=-L$(LIBDIR) -lXaw $(XMULIB) -lXt $(EXTENSIONLIB) -lX11 -lm
  834. #LIBS=-L$(LIBDIR) -lX11 -lm
  835. SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c
  836. OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
  837. CC=cc
  838. RM=rm -f
  839.  
  840. .c.o:
  841.     $(CC) -c $(CFLAGS) $*.c
  842.  
  843. xdvi:    $(OBJS)
  844.     $(CC) -o xdvi $(OBJS) $(LIBS)
  845.     chmod go+rx xdvi
  846.  
  847. xdvi.o: xdvi.h patchlevel.h xdvi.icon
  848. dvi_init.o:xdvi.h dvi.h
  849. dvi_draw.o:xdvi.h dvi.h
  850. tpic.o:    xdvi.h
  851.  
  852. gf.o:    xdvi.h
  853. pk.o:    xdvi.h
  854. pxl.o:    xdvi.h
  855.  
  856. pxl_open.o:    pxl_open.c xdvi.h
  857.     $(CC) -c $(CFLAGS) $(FONTDEFINES) pxl_open.c
  858.  
  859. xdvi.man: xdvi_man.sed mksedscript
  860.     chmod u+x mksedscript
  861.     ./mksedscript $(DEFAULT_FONT_PATH) $(DEFAULT_FONT_SIZES) $(DEFS) \
  862.         > sedscript
  863.     sed -f sedscript < xdvi_man.sed > xdvi.man
  864.  
  865. install: xdvi xdvi.man
  866.     cp xdvi $(BINDIR)
  867.     cp xdvi.man $(MANDIR)/xdvi.1
  868.     chmod 644 $(MANDIR)/xdv
  869.  
  870. clean:
  871.     $(RM) *.o *.BAK *.CKP sedscript xdvi.man xdvi a.out core errs *~
  872.  
  873. lint:
  874.     lint $(INCLUDES) $(DEFS) $(FONTDEFINES) $(SRCS) -lm
  875. ------------------- end of Makefile for XDVI ----------------
  876.  
  877. 3. make xdvi
  878.  
  879. 4. make install
  880.  
  881. And you should be running
  882.  
  883.  
  884.  
  885. =========================== DVIPS ======================
  886.  
  887. 1. cd /usr/distribution/dvips
  888.  
  889. 2. Then I modified the Makefile to be:
  890. ---------------------- Makefile starts -----------
  891. #
  892. #   Makefile for dvips
  893. #
  894.  
  895. # If you are compiling dvips for suid or other privileges, you will
  896. # definitely want to define the following symbol; else don't.
  897. #  SECURE = -DSECURE
  898.  
  899. # If you want EMTEX specials, define the following.
  900. # EMTEX = -DEMTEX
  901.  
  902. # for SYSV (and friends which use <string.h> instead of <strings.h>)
  903. # define the c-compiler flag
  904. # add -D_POSIX_SOURCE if you are POSIX (also define SYSV) (only relevant
  905. # for subdir searching)
  906. # SYS = -DSYSV
  907.  SYS = -DSYSV
  908.  
  909. # Define this to be whatever you use for installation.  If you don't have
  910. # install, use a script that invokes copy and chmod's the files
  911. # appropriately.
  912. # INSTALL = install
  913. INSTALL = /usr/distribution/dvips/instaldvips
  914.  
  915. # the default paper format, if other than letter.
  916. # DEFPFMT = -DDEFPFMT=\"a4\"
  917. DEFPFMT =
  918.  
  919. # where the installed binary goes
  920. # BINDIR = /usr/local/bin
  921. BINDIR = /usr/local/bin
  922.  
  923. # where the TFM files go
  924. # TFMDIR = /usr/local/lib/tex/fonts/tfm
  925. TFMDIR = /usr/local/lib/tex/fonts/tfm
  926.  
  927. # the default path to search for TFM files 
  928. # (this usually is identical to TeX's defaultfontpath, which omits `.')
  929. # (private fonts are given an explicit directory, which overrides the path)
  930. # TFMPATH = /LocalLibrary/Fonts/TeXFonts/tfm:$(TFMDIR)
  931.  
  932. TFMPATH = $(TFMDIR)
  933.  
  934. # where the PK files go.
  935. # PKDIR = /usr/local/lib/tex/fonts/pk
  936. PKDIR = /usr/local/lib/tex/fonts/pk
  937.  
  938. # the default path to search for PK files (usually omits `.')
  939. # Don't forget to add the directory that
  940. # MakeTeXPK puts the files!  (In this case, /LocalLibrary/Fonts...)
  941. # PKPATH = /LocalLibrary/Fonts/TeXFonts/pk:$(PKDIR)
  942. PKPATH = $(PKDIR)
  943.  
  944. # where the VF files go
  945. # VFDIR = /usr/local/lib/tex/fonts/vf
  946. VFDIR = /usr/local/lib/tex/fonts/vf
  947.  
  948. # the default path to search for VF files (usually omits `.')
  949. # VFPATH = /LocalLibrary/Fonts/TeXFonts/vf:$(VFDIR)
  950. VFPATH = $(VFDIR)
  951.  
  952. # additional directories in which to search for subdirectories to find
  953. # both tfm and pk files
  954. FONTSUBDIRPATH = 
  955.  
  956. # where the config files go
  957. # CONFIGDIR = /usr/local/lib/tex/ps
  958. CONFIGDIR = /usr/local/lib/tex/ps
  959.  
  960. # the default path to search for config files
  961. # CONFIGPATH = .:$(CONFIGDIR)
  962. CONFIGPATH = .:$(CONFIGDIR)
  963.  
  964. # the name of your config file
  965. # CONFIGFILE = config.ps
  966. CONFIGFILE = config.ps
  967.  
  968. # where the header PS files go
  969. # HEADERDIR = /usr/local/lib/tex/ps
  970. HEADERDIR = /usr/local/lib/tex/ps
  971.  
  972. # the default path to search for header files
  973. # HEADERPATH = .:$(HEADERDIR)
  974. HEADERPATH = .:$(HEADERDIR)
  975.  
  976. # where epsf.tex and rotate.tex go (usually the TeX macros directory)
  977. # TEXMACRODIR = /usr/local/lib/tex/inputs
  978. TEXMACRODIR = /usr/local/lib/tex/inputs
  979.  
  980. # the default path to search for epsf and psfiles
  981. # (usually the same as TeX's defaultinputpath)
  982. # FIGPATH = .:..:/usr/local/lib/tex/inputs
  983. FIGPATH = .:..:/usr/local/lib/tex/inputs
  984.  
  985. # where the manual page goes
  986. #MANDIR = /usr/local/man/man1
  987. MANEXT = 1
  988. #MANDIR = /usr/local/man/man$(MANEXT)
  989.  
  990. # add -DDEBUG to turn on debugging capability
  991. # add -DTPIC for tpic support
  992. # if the default resolution is not 300 dpi,
  993. # add -DDEFRES=400 or whatever is required
  994. # add -DFONTLIB to search font libraries
  995. # add -DSEARCH_SUBDIRECTORIES to search the FONTSUBDIRPATH.
  996. # add -DHAVE_GETCWD if you have getcwd (relevant only for subdir searching)
  997. DEFS= -DTPIC -DDEBUG 
  998.  
  999. # either use
  1000. # OPT = -g -Wall
  1001. # or
  1002. OPT = -O -s
  1003.  
  1004. # libraries to include (-lm -lc on most systems)
  1005. #FLIBS= -lNeXT_s -lsys_s
  1006. FLIBS= -lm
  1007.  
  1008. PATHS = -DTFMPATH=\"$(TFMPATH)\" \
  1009.     -DPKPATH=\"$(PKPATH)\" \
  1010.     -DVFPATH=\"$(VFPATH)\" \
  1011.     -DHEADERPATH=\"$(HEADERPATH)\" \
  1012.     -DCONFIGPATH=\"$(CONFIGPATH)\" \
  1013.         -DCONFIGFILE=\"$(CONFIGFILE)\" \
  1014.     -DFONTSUBDIRPATH=\"$(FONTSUBDIRPATH)\" \
  1015.     -DFIGPATH=\"$(FIGPATH)\"
  1016.  
  1017. CFLAGS = $(DEFS) $(PATHS) $(OPT) $(SYS) $(SECURE) $(EMTEX) $(DEFPFMT)
  1018.  
  1019. SRC = dospecial.c dviinput.c fontdef.c loadfont.c dvips.c tfmload.c \
  1020.     download.c prescan.c scanpage.c skippage.c output.c scalewidth.c \
  1021.     dosection.c dopage.c resident.c search.c unpack.c drawPS.c \
  1022.     header.c makefont.c repack.c virtualfont.c dpicheck.c finclude.c \
  1023.     flib.c
  1024.  
  1025. OBJ = dospecial.o dviinput.o fontdef.o loadfont.o dvips.o tfmload.o \
  1026.     download.o prescan.o scanpage.o skippage.o output.o scalewidth.o \
  1027.     dosection.o dopage.o resident.o search.o unpack.o drawPS.o \
  1028.     header.o makefont.o repack.o virtualfont.o dpicheck.o finclude.o \
  1029.     flib.o
  1030.  
  1031. # files required to make a distribution
  1032. CONFIGFILES = config.ps psfonts.map
  1033. HEADERFILES = tex.lpro texc.script texps.lpro special.lpro finclude.lpro
  1034. FILES = $(CONFIGFILES) $(HEADERFILES) $(SRC) \
  1035.     Makefile INSTALLATION README rotsample.tex AGaramond-Demo.pfb \
  1036.     MakeTeXPK ../afm/Makefile epsf.tex epsf.sty rotate.tex rotate.sty \
  1037.         dvips.1 paths.h debug.h structures.h squeeze.c afm2tfm.c afm2tfm.1
  1038.  
  1039. all : afm2tfm dvips tex.pro texps.pro texc.pro special.pro finclude.pro
  1040.  
  1041. dvips : $(OBJ)
  1042.     $(CC) $(CFLAGS) $(OBJ) $(LIBS) $(FLIBS) -o dvips
  1043.  
  1044. afm2tfm: afm2tfm.c
  1045.     $(CC) $(CFLAGS) -o afm2tfm afm2tfm.c $(LIBS) $(FLIBS)
  1046.  
  1047. $(OBJ) : structures.h debug.h Makefile
  1048. flib.o resident.o dvips.o loadfont.o tfmload.o : paths.h
  1049.  
  1050. squeeze : squeeze.o
  1051.     $(CC) $(CFLAGS) squeeze.o -o squeeze $(LIBS) $(FLIBS)
  1052.  
  1053. tex.pro : tex.lpro squeeze
  1054.     ./squeeze <tex.lpro > tex.pro
  1055.  
  1056. texc.pro: texc.lpro squeeze
  1057.     ./squeeze <texc.lpro >texc.pro
  1058.  
  1059. texc.lpro: texc.script tex.lpro
  1060.     ./texc.script tex.lpro texc.lpro
  1061.  
  1062. texps.pro : texps.lpro squeeze
  1063.     ./squeeze <texps.lpro >texps.pro
  1064.  
  1065. special.pro : special.lpro squeeze
  1066.     ./squeeze <special.lpro >special.pro
  1067.  
  1068. finclude.pro : finclude.lpro squeeze
  1069.     ./squeeze <finclude.lpro >finclude.pro
  1070.  
  1071. install : afm2tfm dvips MakeTeXPK \
  1072.     tex.pro texc.pro texps.pro special.pro finclude.pro \
  1073.     config.ps psfonts.map epsf.tex epsf.sty rotate.tex rotate.sty \
  1074.     dvips.1 afm2tfm.1
  1075.     - mkdir $(BINDIR)
  1076.     - mkdir $(HEADERDIR)
  1077.     - mkdir $(CONFIGDIR)
  1078.     - mkdir $(MANDIR)
  1079.     - mkdir $(TEXMACRODIR)
  1080.     $(INSTALL) -c -m 755 afm2tfm $(BINDIR)/afm2tfm
  1081.     $(INSTALL) -c -m 755 dvips $(BINDIR)/dvips
  1082.     $(INSTALL) -c -m 755 MakeTeXPK $(BINDIR)/MakeTeXPK
  1083.     $(INSTALL) -c -m 644 tex.pro $(HEADERDIR)
  1084.     $(INSTALL) -c -m 644 texc.pro $(HEADERDIR)
  1085.     $(INSTALL) -c -m 644 texps.pro $(HEADERDIR)
  1086.     $(INSTALL) -c -m 644 special.pro $(HEADERDIR)
  1087.     $(INSTALL) -c -m 644 finclude.pro $(HEADERDIR)
  1088.     $(INSTALL) -c -m 644 config.ps $(CONFIGDIR)/$(CONFIGFILE)
  1089.     $(INSTALL) -c -m 644 psfonts.map $(CONFIGDIR)
  1090.     $(INSTALL) -c -m 644 epsf.tex $(TEXMACRODIR)
  1091.     $(INSTALL) -c -m 644 epsf.sty $(TEXMACRODIR)
  1092.     $(INSTALL) -c -m 644 rotate.tex $(TEXMACRODIR)
  1093.     $(INSTALL) -c -m 644 rotate.sty $(TEXMACRODIR)
  1094.     -$(INSTALL) -c -m 644 dvips.1 $(MANDIR)/dvips.$(MANEXT)
  1095.     -$(INSTALL) -c -m 644 afm2tfm.1 $(MANDIR)/afm2tfm.$(MANEXT)
  1096.  
  1097. veryclean :
  1098.     rm -f *.o dvips squeeze afm2tfm texc.lpro *.pro *~ *.log *.dvi
  1099.  
  1100. clean :
  1101.     rm -f *.o squeeze afm2tfm *~ *.log *.dvi
  1102.  
  1103. lint :
  1104.     lint $(DEFS) $(PATHS) $(SRC)
  1105.     lint $(DEFS) squeeze.c
  1106.     lint $(DEFS) afm2tfm.c
  1107.  
  1108. ---------------------- end of Makefile ---------------
  1109.  
  1110.   
  1111. 3) Then I modified file config.ps to be:
  1112.  
  1113. -------------------config.ps starts -----------------
  1114. * This is /usr/local/lib/tex/ps/config.ps file. If want to modify settings
  1115. * copy it to $HOME/.dvipsrc and make changes. REMEMBER !!! once you have
  1116. * .dvipsrc in your $HOME, the contents of this config.ps file is overwritten
  1117. *  by your * .dvipsrc !!!
  1118. *
  1119. *   With a virtual machine, we can claim 1M of memory (i.e. m 1000000)
  1120. *   which is true for NeXTprinter. For our OmniLaser it is 450000
  1121. *
  1122. m 450000
  1123. *
  1124. *   And send output by default to a PostScript file.
  1125. *
  1126. *o !lpr
  1127. o
  1128. *
  1129. *
  1130. * This is our default printer OmniLaser, i.e. M is laserwriter
  1131. * For 400dpi NeXT printer change it to "M NeXTprinter"
  1132. M laserwriter
  1133. *
  1134. *
  1135. * Change this path for NeXTprinter to:
  1136. *   P .:/usr/local/lib/tex/fonts/pk/NeXTPrinter
  1137. P .:/usr/local/lib/tex/fonts/pk/laserwriter
  1138. *
  1139. T .:/usr/local/lib/tex/fonts/tfm
  1140. *
  1141. *   Default resolution. Change this to D 400 for NeXTprinter
  1142. D 300
  1143. *
  1144. *   Last resort sizes.
  1145. *
  1146. R 100 120 144 300 360 400 432 480
  1147.  
  1148. -------------------------- config.ps ends ----------------
  1149.  
  1150.  
  1151. 4) Then I modified file MakeTeXPK to be:
  1152.  
  1153. ----------------------MakeTeXPK starts--------------------
  1154. #!/bin/sh
  1155. #
  1156. #   This script file makes a new TeX PK font, because one wasn't
  1157. #   found.  Parameters are:
  1158. #
  1159. #   name dpi bdpi magnification [mode]
  1160. #
  1161. #   `name' is the name of the font, such as `cmr10'.  `dpi' is
  1162. #   the resolution the font is needed at.  `bdpi' is the base
  1163. #   resolution, useful for figuring out the mode to make the font
  1164. #   in.  `magnification' is a string to pass to MF as the
  1165. #   magnification.  `mode', if supplied, is the mode to use.
  1166. #
  1167. #   Note that this file must execute Metafont, and then gftopk,
  1168. #   and place the result in the correct location for the PostScript
  1169. #   driver to find it subsequently.  If this doesn't work, it will
  1170. #   be evident because MF will be invoked over and over again.
  1171. #
  1172. #   Of course, it needs to be set up for your site.
  1173. #
  1174. # TEMPDIR needs to be unique for each process because of the possibility
  1175. # of simultaneous processes running this script.
  1176. # DESTDIR=/LocalLibrary/Fonts/TeXFonts/pk
  1177. TEMPDIR=/tmp/mtpk.$$
  1178. NAME=$1
  1179. DPI=$2
  1180. BDPI=$3
  1181. MAG=$4
  1182. MODE=$5
  1183.  
  1184. umask 0
  1185.  
  1186. if test "$MODE" = ""
  1187. then
  1188.    if test $BDPI = 300
  1189.    then
  1190.       MODE=laserwriter
  1191.    elif test $BDPI = 400
  1192.    then
  1193.       MODE=NeXTprinter
  1194.    elif test $BDPI = 100
  1195.    then
  1196.       MODE=nextscreen
  1197.    elif test $BDPI = 635
  1198.    then
  1199.       MODE=linolo
  1200.    elif test $BDPI = 1270
  1201.    then
  1202.       MODE=linohi
  1203.    elif test $BDPI = 2540
  1204.    then
  1205.       MODE=linosuper
  1206.    else
  1207.       echo "I don't know the mode for $BDPI"
  1208.       echo "Have your system admin update MakeTeXPK"
  1209.       exit 1
  1210.    fi
  1211. fi
  1212.  
  1213. #  Something like the following is useful at some sites.
  1214.  DESTDIR=/usr/local/lib/tex/fonts/pk/$MODE
  1215.  
  1216. GFNAME=$NAME.$DPI'gf'
  1217. PKNAME=$NAME.$DPI'pk'
  1218.  
  1219. # Clean up on normal or abnormal exit
  1220. trap "cd /; rm -rf $TEMPDIR $DESTDIR/pktmp.$$" 0 1 2 15
  1221.  
  1222.  
  1223. if test ! -d $DESTDIR
  1224. then
  1225.    mkdir $DESTDIR
  1226. fi
  1227.  
  1228. mkdir $TEMPDIR
  1229. cd $TEMPDIR
  1230.  
  1231. if test -r $DESTDIR/$PKNAME
  1232. then
  1233.    echo "$DESTDIR/$PKNAME already exists!"
  1234.    exit 0
  1235. fi
  1236.  
  1237. # check also in the standard place
  1238.  
  1239. if test -r /usr/lib/tex/fonts/pk/$PKNAME
  1240. then
  1241.    echo /usr/lib/tex/fonts/pk/$PKNAME already exists!
  1242.    exit 0
  1243. fi
  1244.  
  1245. echo cmmf "\mode:=$MODE; mag:=$MAG; scrollmode; input $NAME" \\\</dev/null
  1246. cmmf "\mode:=$MODE; mag:=$MAG; scrollmode; input $NAME" </dev/null
  1247. if test ! -r $GFNAME
  1248. then
  1249.    echo "Metafont failed for some reason on $GFNAME"
  1250.    exit 1
  1251. fi
  1252.  
  1253. gftopk ./$GFNAME $PKNAME
  1254.  
  1255. # Install the PK file carefully, since others may be doing the same
  1256. # as us simultaneously.
  1257.  
  1258. chmod 644 $PKNAME
  1259. mv $PKNAME $DESTDIR/pktmp.$$
  1260. cd $DESTDIR
  1261. mv pktmp.$$ $PKNAME
  1262.  
  1263. #check also for tfm being in place
  1264. tfm=/usr/local/lib/tex/fonts/tfm/$NAME.tfm
  1265. if test -r $tfm
  1266. then
  1267.    exit 0
  1268. else
  1269. chmod 644 $TEMPDIR/$NAME.tfm
  1270. mv $TEMPDIR/$NAME.tfm $tfm.$$
  1271. mv $tfm.$$ $tfm
  1272. fi
  1273.  
  1274. exit 0
  1275. ---------------------------- end of MakeTeXPK -----------------
  1276.  
  1277.  
  1278. 5) rehashed (I used csh as root)
  1279.  
  1280. 6) Then I created missing cminch file by calling MakeTeXPK as:
  1281.       MakeTeXPK cminch 300 300 magstep\(0\)
  1282.  
  1283. 7) Then I created basis pk files in the following way:
  1284.      ls /usr/local/lib/tex/fonts/tfm > makepkfiles
  1285.    I edited this file so each line was calling MakeTeXPK with the font name.
  1286.    That is, the line containing, e.g.:
  1287.       cmr12.tmf
  1288.    was changed to
  1289.       MakeTeXPK cmr12 300 300 magstep\(0\)
  1290.    chmod 755 makepkfiles
  1291.    and finaly:
  1292.    makepkfiles
  1293.    It takes about 2 hours to generate fonts !
  1294.  
  1295. 8) The virtual and PostScript Fonts. When you uncompressed and untarred
  1296.    dvipsamf.tar.Z you will get directory ./afm, and from dvipslib.tar.Z
  1297.    you get ./afm-extra, ./PStfms, and ./PSvfs.
  1298.    The dvipsamf.tar.Z is actually what you need -- it containes scripts
  1299.    to create virtual fonts (Yes, you need to print the dvips.tex to learn
  1300.    more !). I used the scripts to check if they work. They did.
  1301.    a) cd /usr/distribution/afm
  1302.    b) edit Makefile by changing 2 lines at the very end:
  1303.       mv *.tfm ../PStfms  ---->  mv *.tfm /usr/local/lib/tex/fonts/tfm
  1304.       mv *.vf ../PSvfs    ---->  mv *.vf /usr/local/lib/tex/fonts/vf
  1305.    c) create vf directory if you did not, i.e.:
  1306.       mkdir /usr/local/lib/tex/fonts/vf
  1307.    d) when you are in /usr/distribution/afm do:
  1308.       make
  1309.       make install
  1310.       set junk=/usr/local/lib/tex/fonts/PStoVF_scripts
  1311.       mkdir $junk
  1312.       cp *.ed $junk
  1313.       cp Makefile $junk
  1314.    I saved the scripts, simply because they are nice, and you might need them
  1315.    in the future
  1316.  
  1317. 9) I saved various docs and README's in /usr/local/lib/tex/doc
  1318.    Namely:
  1319.    dvipsmac.tex & dvips.tex {macro and manual for dvips) in ./dvips
  1320.    MFdoc directory under ./MF, etc.
  1321.  
  1322. 10) Then I did:
  1323.    cd /usr/local/lib/tex/fonts
  1324.    find . -type d -exec chmod a+rwx,u+t {} \;
  1325.    find . -type f -exec chmod go-wx {} \;
  1326.    This is moderately secure, the only risk is that people will store
  1327.    a lot of junk in font directories and you will have to clean them
  1328.    at times.
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.